<?php
namespace backend\controllers;

use Yii;
use yii\web\Controller;
use yii\filters\VerbFilter;
use yii\filters\AccessControl;
use common\models\LoginForm;

/**
 * Site controller
 */
class SiteController extends Controller
{
    /**
     * Displays homepage.
     *
     * @return string
     */
    public function actionIndex()
    {
        
        $session = Yii::$app->session;
        $id = $session->get(\backend\models\LoginForm::BACKEND_ID);
        $name = $session->get(\backend\models\LoginForm::BACKEND_USERNAME);
        
        $cookie = Yii::$app->request->cookies->getValue(\backend\models\LoginForm::BACKEND_COOKIE);
//        var_dump($cookie);
//        print_r($cookie);
//        die($id.'，and the name is:'.$name.'and the cookie is:');
        return $this->renderPartial('index');
    }

   
}
